Integrand size = 38, antiderivative size = 82 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^2 B x+\frac {a^2 (4 B+3 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a^2 (2 B+3 C) \tan (c+d x)}{2 d}+\frac {C \left (a^2+a^2 \sec (c+d x)\right ) \tan (c+d x)}{2 d} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {4157, 4002, 3999, 3852, 8, 3855} \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^2 (4 B+3 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a^2 (2 B+3 C) \tan (c+d x)}{2 d}+a^2 B x+\frac {C \tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{2 d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3999
Rule 4002
Rule 4157
Rubi steps \begin{align*} \text {integral}& = \int (a+a \sec (c+d x))^2 (B+C \sec (c+d x)) \, dx \\ & = \frac {C \left (a^2+a^2 \sec (c+d x)\right ) \tan (c+d x)}{2 d}+\frac {1}{2} \int (a+a \sec (c+d x)) (2 a B+a (2 B+3 C) \sec (c+d x)) \, dx \\ & = a^2 B x+\frac {C \left (a^2+a^2 \sec (c+d x)\right ) \tan (c+d x)}{2 d}+\frac {1}{2} \left (a^2 (2 B+3 C)\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{2} \left (a^2 (4 B+3 C)\right ) \int \sec (c+d x) \, dx \\ & = a^2 B x+\frac {a^2 (4 B+3 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {C \left (a^2+a^2 \sec (c+d x)\right ) \tan (c+d x)}{2 d}-\frac {\left (a^2 (2 B+3 C)\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{2 d} \\ & = a^2 B x+\frac {a^2 (4 B+3 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a^2 (2 B+3 C) \tan (c+d x)}{2 d}+\frac {C \left (a^2+a^2 \sec (c+d x)\right ) \tan (c+d x)}{2 d} \\ \end{align*}
Time = 0.53 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.65 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^2 (2 B d x+(4 B+3 C) \text {arctanh}(\sin (c+d x))+(2 B+4 C+C \sec (c+d x)) \tan (c+d x))}{2 d} \]
[In]
[Out]
Time = 0.34 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.39
method | result | size |
derivativedivides | \(\frac {B \,a^{2} \tan \left (d x +c \right )+C \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+2 B \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 C \,a^{2} \tan \left (d x +c \right )+B \,a^{2} \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(114\) |
default | \(\frac {B \,a^{2} \tan \left (d x +c \right )+C \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+2 B \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 C \,a^{2} \tan \left (d x +c \right )+B \,a^{2} \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(114\) |
parallelrisch | \(-\frac {2 a^{2} \left (\left (1+\cos \left (2 d x +2 c \right )\right ) \left (B +\frac {3 C}{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\left (1+\cos \left (2 d x +2 c \right )\right ) \left (B +\frac {3 C}{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {B x d \cos \left (2 d x +2 c \right )}{2}+\left (-\frac {B}{2}-C \right ) \sin \left (2 d x +2 c \right )-\frac {B x d}{2}-\frac {C \sin \left (d x +c \right )}{2}\right )}{d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(127\) |
risch | \(a^{2} B x -\frac {i a^{2} \left (C \,{\mathrm e}^{3 i \left (d x +c \right )}-2 B \,{\mathrm e}^{2 i \left (d x +c \right )}-4 C \,{\mathrm e}^{2 i \left (d x +c \right )}-C \,{\mathrm e}^{i \left (d x +c \right )}-2 B -4 C \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}+\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}-\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}-\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}\) | \(172\) |
norman | \(\frac {a^{2} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {a^{2} \left (2 B +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}+\frac {a^{2} \left (2 B +5 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-a^{2} B x +2 a^{2} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 a^{2} B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-\frac {a^{2} \left (2 B +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {a^{2} \left (2 B +5 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}-\frac {a^{2} \left (4 B +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a^{2} \left (4 B +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(248\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.45 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \, B a^{2} d x \cos \left (d x + c\right )^{2} + {\left (4 \, B + 3 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (4 \, B + 3 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, {\left (B + 2 \, C\right )} a^{2} \cos \left (d x + c\right ) + C a^{2}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
[In]
[Out]
\[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^{2} \left (\int B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 2 B \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 C \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.73 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \, {\left (d x + c\right )} B a^{2} - C a^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, B a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, C a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, B a^{2} \tan \left (d x + c\right ) + 8 \, C a^{2} \tan \left (d x + c\right )}{4 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 154 vs. \(2 (76) = 152\).
Time = 0.32 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.88 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (d x + c\right )} B a^{2} + {\left (4 \, B a^{2} + 3 \, C a^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (4 \, B a^{2} + 3 \, C a^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (2 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}}}{2 \, d} \]
[In]
[Out]
Time = 15.42 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.98 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,B\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,B\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {3\,C\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {B\,a^2\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {2\,C\,a^2\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {C\,a^2\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2} \]
[In]
[Out]